package no.knowit.pages;

import java.util.List;

import no.knowit.entities.Oppdragsgiver;

import org.apache.tapestry5.annotations.ContentType;
import org.apache.tapestry5.annotations.PageAttached;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.hibernate.Session;

@ContentType("text/xml")
public class Data {
	@Inject
	private Session session;
	@Property
	private List<Oppdragsgiver> oppdragsgivere;

	@Property
	private Oppdragsgiver oppdragsgiver;

	@SuppressWarnings("unchecked")
	@PageAttached
	void hentData() {
		oppdragsgivere = session.createCriteria(Oppdragsgiver.class).list();
	}

}
